def twoSum(nums, target):
    i = 0
    while i < len(nums) - 1:
        j = i + 1
        while j < len(nums):
            if nums[i] + nums[j] == target:
                return [i, j]
            else:
                j += 1
        i += 1

    return []


nums = [3, 2, 4]
target = 6
print(twoSum(nums, target))  # [1, 2]
